/**
 * 
 */
package org.cnbi.utils.chart.component;

import java.io.Serializable;
import java.text.DecimalFormat;



import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.map.annotate.JsonSerialize;

/**
 * @company 中国经邦
 * @author Administrator
 * @date: 2014年3月14日下午5:38:23
 * @version: V1.0  
 */
public class Data implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@JsonSerialize(include= JsonSerialize.Inclusion.NON_NULL)
	protected String label;
	@JsonSerialize(include= JsonSerialize.Inclusion.NON_NULL)
	protected String value;
	@JsonSerialize(include= JsonSerialize.Inclusion.NON_NULL)
	protected String color;
	@JsonSerialize(include= JsonSerialize.Inclusion.NON_NULL)
	
	protected String link;
	
	@JsonSerialize(include= JsonSerialize.Inclusion.NON_NULL)
	protected String tooltext ;
	@JsonIgnore
	public static DecimalFormat format = new DecimalFormat("#,##0.00");
	


	public void setTooltext(String tooltext) {
		if(null == label){
			this.tooltext= null;
		}else{
			this.tooltext = tooltext;
		}
		
	}



	public static long getSerialversionuid() {
		return serialVersionUID;
	}



	public Data(){}
	
	

	/**
	 * @param label
	 * @param value
	 * @param color
	 * @param link
	 */
	public Data(String label, String value, String color, String link) {
		super();
		this.label = label;
		this.value = value;
		this.color = color;
		this.link = link;
	}
	public Data(String label, String value) {
		this.label = label;
		this.value = value;
	}
	public Data(String label, String value, String color) {
		this.label = label;
		this.value = value;
		this.color = color;
	}



	/**
	 * @param label the label to set
	 */
	public void setLabel(String label) {
		this.label = label;
	}



	/**
	 * @param value the value to set
	 */
	public void setValue(String value) {
		this.value = value;
	}



	/**
	 * @param color the color to set
	 */
	public void setColor(String color) {
		this.color = color;
	}



	/**
	 * @param link the link to set
	 */
	public void setLink(String link) {
		this.link = link;
	}



	
	

}
